home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
OTHER_LA
/
QUINTA
/
FRAC.Q
< prev
next >
Wrap
Text File
|
1990-03-22
|
479b
|
11 lines
; This routine was written by Jurjen N.E. Bos (jurjen@cwi.nl)
; for the HP-28 calculator. Very little conversion was necessary
; for Quinta to handle it nicely. Also, I modified his code
; to always operate at the highest precision possible.
[ 15.0 neg alog 2 / "p" local "x" local 1 "a" local 0 "b" local
x while x a * 0.5 + floor x a * - abs p a * >= repeat
inv dup ip abs a * b + a 'b' sto 'a' sto fp end
drop x a * 0.5 + floor a >expr / ] "frac" pub float respond